﻿@if (Request.IsAuthenticated)
{
    if (CurrentSession.IsUserLoggedIn())
    {
    <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="#">@Navigation.ModulesRESX<b class="caret"></b></a>
        <ul class="dropdown-menu">
            @if (WebRights.Right().Check(EUserRights.UserModule))
            { <li>@Html.ActionLink(Navigation.UsersRESX, EActionUser.UserList.ToString(), EControllers.User.ToString())</li>}
            @if (WebRights.Right().Check(EUserRights.WorktimeModule))
            { <li>@Html.ActionLink(Navigation.WorktimeCreate, EActionWorktime.Worktime.ToString(), EControllers.Worktime.ToString(), new {id=0, userId=CurrentSession.GetCurrentUser().ID}, null)</li>}
            @if (WebRights.Right().IsAdmin())
            { <li>@Html.RouteLink(Navigation.AdministrationRESX, RouteNames.Categories.ToString(), new { controller = EControllers.Administration.ToString(), category = EFCategoryTypes.UserRights.ToString(), action = EActionAdministration.CategoriesList.ToString() })</li> }
        </ul>
    </li>
    }
}